<?php 


class MyAuthController extends Controller
{
	
	
public function ActionRun(){
	
	$auth=Yii::app()->authManager;
/* 
	$auth->createOperation('adminUsers','admin the users');
	
	$role=$auth->createRole('admin');
	$role->addChild('adminUsers');
	
	$auth->assign('admin','1');
	
	echo "Operation Completed";
	 */
	
	
	if (Yii::app()->user->isGuest) echo "guest";
	else 
	echo Yii::app()->user->role;
	
} 

public function ActionCheckAccess(){
	echo $_REQUEST['actionName']."<br/>";
	if(Yii::app()->user->checkAccess($_REQUEST['actionName']))
		echo "authorized";
	else 
		echo "not authorized";
	
}
	
}	